package com.wuhuahe.learning.lagou.service.user.service.impl;

import com.wuhuahe.learning.lagou.service.user.mapper.TokenMapper;
import com.wuhuahe.learning.lagou.service.user.pojo.Token;
import com.wuhuahe.learning.lagou.service.user.service.TokenService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TokenServiceImpl implements TokenService {

    @Resource
    private TokenMapper tokenMapper;


    @Override
    public long insertToken(Token token) {
        return tokenMapper.insertToken(token);
    }

    @Override
    public void updateToken(Token token) {

        tokenMapper.updateToken(token);

    }

    @Override
    public Token findByEmail(String email) {
        return tokenMapper.findByEmail(email);
    }
}
